<include file="Public/head" />
<style type="text/css">
    .store_status{border: 1px solid #d2d2d2;color: #303030;display: block;float: left;height: 26px;line-height: 26px;text-align: center;width: 300px;}
</style>
<script src="{:get_style_cdnurl()}paimai/yunying/js/city.js" type="text/javascript"></script>
</head>
<body>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar"  menu="mdgl.md" />
    <form id="store_form" action="/StoreManage/add_post" method="post"  >
        <div class="mianR">
            <h3 class="cha">编辑门店</h3>
            <div class="shangFrom shangFrom1 clearfix"></div>
            <div class="employee">
                <ul class="clearfix">
                    <li>
                        <span>*门店名称</span>
                        <input type="text"  name="store_name" value="{$store.store_name}"  placeholder="门店名称"/>
                    </li>
                    <li>
                        <span>*门店负责人</span>
                        <input type="text"  name="store_lead" value="{$store.store_lead}"  placeholder="门店负责人"/>
                    </li>
                    <li>
                        <span>*所在地区</span>												
                        <script>
                            var add = new AddressCom();
                        </script>
                    </li> 
                     <li>
                        <span>*负责人手机号</span>
                        <input type="text"  name="lead_mobile" value="{$store.lead_mobile}"  placeholder="负责人手机号"/>
                    </li>
                      <li>
                        <span>*详细地址</span>
                        <input type="text"  name="store_address" value="{$store.address}" placeholder="门店详细地址" />
                    </li>
                     <li>
                        <span>*负责人邮箱</span>
                        <input type="text"  name="lead_email" value="{$store.lead_email}"  placeholder="负责人邮箱"/>
                    </li>
                    <li>
                        <span>*门店电话</span>
                        <input type="text"  name="store_tel" value="{$store.store_tel}"  placeholder="门店电话"/>
                    </li>
<!--                    <li>
                        <span>状态</span>
                        <select name="store_status" class="store_status">
                            <if condition='$store.status eq 0'>
                            <option value="0" selected>正常</option>
                            <option value="1">禁用</option>
                            <else/>
                                <option value="0">正常</option>
                                <option value="1" selected>禁用</option>
                            </if>
                        </select>
                    </li>-->

                    <li>
                        <span>*门店类型</span>
                        <select name="type">
                            <option value="1" <if condition="$store['type'] eq 1">selected="selected"</if>>体验店</option>
                            <option value="2" <if condition="$store['type'] eq 2">selected="selected"</if>>社区门店</option>
                        </select>
                    </li>

                    <li>
                        <span>服务范围</span>
                        <textarea cols="40" rows="3" name="service">{$store.service}</textarea>
                    </li>

                    <li>
                        <span>*坐标(X)</span>
                        <input type="text" name="pointer_x" value="{$store.pointer_x}">
                    </li>
                    <li>
                        <span>*坐标(Y)</span>
                        <input type="text"  name="pointer_y" value="{$store.pointer_y}"/>
                    </li>
                    <li>
                        <span>地图二维码</span>
                        <input type="file" class="file_upload_style" id="file_imgcode" onclick="uploadCarPic('qrcode')">
                        <input type="hidden" name="qrcode" id="qrcode" value="{$store.qrcode}"/>
                        <div class="upload-img-box">
                           <div class="upload-pre-item"><img src="{$store.qrcode}"/></div>
                        </div>
                    </li>
                    <li>
                        <span><a href="http://api.map.baidu.com/lbsapi/creatmap/index.html" target="_blank" title="获取百度地图代码">百度地图代码</a></span>
                        <textarea name="script" style="width:88%;height:360px;"></textarea>
                    </li>

                </ul>
            </div>
            <div class="yongBtn">
                <input type="hidden"  name="store_id" value="{$store.store_id}" />
                <input type="button" value="确定" class="queding" />
                <input name="重置" type="reset" class="quxiao" onclick="history.go(-1);" value="取消" />
            </div>
        </div>
    </form>
</div>
<div class="clear"></div>
<script type="text/javascript">
    $(".queding").click(function(){
            var btn_obj = $(this);
            var post_data = $("#store_form").serialize();
            btn_obj.val("提交中...").attr("disabled", 'disabled');
            $.post("{:U('/StoreManage/edit_post')}", post_data, function (data) {
                if (data.code != 200) {
                    shibai_alert(data.msg, 1500);
                    btn_obj.val("确定").removeAttr("disabled style");
                    return false;
                }
                btn_alert("更新成功", 1500, function () {
                    location.href = "{:U('StoreManage/index')}";
                });
            }, "json");
    })
</script>
<include file="Public/foot" />